namespace game {
    export namespace gameData {

        export class Event extends lib.ObjectValue {
            constructor(init:any = null) {
                super();
                this.className = "Event";
				this.$setMember("testEventWithParams" , new lib.AnyValue(null));
				this.$setMember("testEventNoParams" , new lib.IntValue(null,null,undefined));
				this.$setMember("netSocketEvent" , new lib.AnyValue(null));
				if(init) this.value = init;
				this.$addPropertyBinding();

            }
            
            private bindings:Array<lib.Binding>;
            $addPropertyBinding() {
                if(super.$addPropertyBinding) {
                    super.$addPropertyBinding();
                } else {
                    if(!this.bindings) this.bindings = [];
                    for(let i = 0; i < this.bindings.length; i++) this.bindings[i].dispose();
                    this.bindings.length = 0;
                }

            }
            
            checkAllBinding() {
            	this.$addPropertyBinding();
            	for(let key in this.__value) {
            		if(this.__value[key] && this.__value[key].checkAllBinding) this.__value[key].checkAllBinding();
				}
			}
        
			/**
			 * 测试事件，带参数，抛事件  game.data.event.testEventWithParams = xxx;
			 * @returns {any}
			 */
			get testEventWithParamsValue():lib.Value { return this.__value["testEventWithParams"]; }

			/**
			 * 测试事件，带参数，抛事件  game.data.event.testEventWithParams = xxx;
			 * @returns {any}
			 */
			get testEventWithParams():any {
				return this.__value["testEventWithParams"].value;
			}

			/**
			 * 测试事件，带参数，抛事件  game.data.event.testEventWithParams = xxx;
			 * @param {any}
			 */
			set testEventWithParams(val:any) {
				this.setValue("testEventWithParams", val);
			}

			/**
			 * 测试事件，不带参数，抛事件  game.data.event.testEventNoParams++; 或者 game.data.event.testEventNoParams.dispatchWith(lib.Event.CHANGE)
			 * @returns {number}
			 */
			get testEventNoParamsValue():lib.Value { return this.__value["testEventNoParams"]; }

			/**
			 * 测试事件，不带参数，抛事件  game.data.event.testEventNoParams++; 或者 game.data.event.testEventNoParams.dispatchWith(lib.Event.CHANGE)
			 * @returns {number}
			 */
			get testEventNoParams():number {
				return this.__value["testEventNoParams"].value;
			}

			/**
			 * 测试事件，不带参数，抛事件  game.data.event.testEventNoParams++; 或者 game.data.event.testEventNoParams.dispatchWith(lib.Event.CHANGE)
			 * @param {number}
			 */
			set testEventNoParams(val:number) {
				this.setValue("testEventNoParams", val);
			}

			/**
			 * 服务器网络事件
			 * @returns {any}
			 */
			get netSocketEventValue():lib.Value { return this.__value["netSocketEvent"]; }

			/**
			 * 服务器网络事件
			 * @returns {any}
			 */
			get netSocketEvent():any {
				return this.__value["netSocketEvent"].value;
			}

			/**
			 * 服务器网络事件
			 * @param {any}
			 */
			set netSocketEvent(val:any) {
				this.setValue("netSocketEvent", val);
			}


        }
        
        lib.DataManager.getInstance().$addClassDefine(Event,"game.gameData.Event");
        
    }
    
    
}


